﻿using System;
using System.Collections.Generic;
using System.IO;
using System.IO.IsolatedStorage;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace GlobalClass
{
    public class Global
    {
        public static Dictionary<string, string> GetPlayingOptions()
        {
            Dictionary<string, string> playingOptions = new Dictionary<string, string>();

            using (IsolatedStorageFile fileStorage = IsolatedStorageFile.GetUserStoreForApplication())
            {
                StreamReader fileReader = null;
                try
                {
                    fileReader = new StreamReader(new IsolatedStorageFileStream("playingOptions.txt", FileMode.Open, fileStorage));
                    playingOptions.Add("isRepeatPlaying", fileReader.ReadLine());
                    playingOptions.Add("isRandomPlaying", fileReader.ReadLine());
                    fileReader.Close();
                }
                catch
                {
                }
            }
            
            return playingOptions;
        }
    }
}
